import Vue from "vue";

Vue.directive("focus", {
  binding() {
    // // console.log("binding触发");
  },
  inserted: function(el) {
    // console.log(el);
    // // console.log(el, binding, vnode, oldVnode);
    el.focus();
  },
  update() {
    // // console.log("update触发");
  },
  componentUpdated() {
    // // console.log("componentUpdated触发");
  },
  unbind() {
    // // console.log("unbind触发");
  },
});

Vue.directive("btnadmin", {
  binding() {
    // // console.log("binding触发");
  },
  inserted: function(el, binding) {
    // console.log(binding);
    // // console.log(el, binding, vnode, oldVnode);
    el.style.display = binding.value ? "block" : "none";
  },
  update() {
    // // console.log("update触发");
  },
  componentUpdated() {
    // // console.log("componentUpdated触发");
  },
  unbind() {
    // // console.log("unbind触发");
  },
});
